package com.liuugoqing.creator.singleton.demo2;

/**
 * 立即加载
 *      静态代码块方式
 * @Author : liugq
 * @Date : 2022/6/24 12:19
 * @See : 参考类
 * @Since： JDK1.8
 * @Version : 1.0
 */
public class Singleton {
    private static  Singleton singleton;
    static {
        singleton = new Singleton();
    }

    private Singleton(){}

    public static Singleton getInstance(){
        return singleton;
    }

}
